import React, { PureComponent } from 'react';
import { Flex, Icon } from 'antd-mobile';


import { coupon_Item } from './CouponItem.less';

const goodsTypes = {
  0: '全部商品',
  1: '指定商品分类',
  2: '指定商品类型',
  3: '指定品牌',
  4: '指定商品',
};

class CouponItem extends PureComponent {
  constructor(props) {
    super(props);
  }


  render() {
    const { Item } = this.props;
    const { isGet, couponSource="", description="", shopActivityEntity={} } = Item;

    return (
      <div  className={coupon_Item}>

         <div className="bg">
           <Flex justify="center" className="body">
             <div className="left">
               {/*<div className="type">全场通用</div>*/}
               <div className="store_name">{shopActivityEntity.storeName}</div>
               <Flex className="price">
                   <div style={{ minWidth:"1rem" , textAlign:"right"}}>{couponSource}</div>
                   <div style={{ marginLeft:'0.1rem', fontSize:"0.36rem" }}>元</div>
               </Flex>
             </div>
             <div className="center">
               <div style={{ marginTop:'0.64rem', fontSize:"0.28rem" }}>{description}</div>
               <div style={{ marginTop:'0.2rem', fontSize:"0.20rem" }}>{shopActivityEntity.startTimeStr}-{shopActivityEntity.endTimeStr}</div>
             </div>
             <div className="right">
                 {
                     isGet==1 ? <div className="btn">点击领取</div> : <div className="btn">去使用</div>
                 }

             </div>
           </Flex>

           <img src={require("../../assets/img/couponYes.png")} />
         </div>
         <div className="use_preson">全场通用；app;所有会员使用</div>
      </div>
      );
  }
}

export default CouponItem;

/*
 * 以前测试的，未使用
 * */